<?php

defined('_JEXEC') or die('Restricted access');
jimport('joomla.application.component.view');

class work_pointViewReport extends JView {
	function display($tpl = null)
	{	
        //if(isset($_POST['inp']))
	    //{
	       $post = JRequest::get('post',4);
            
            /*$model = $this->getModel();
            if($post['action']==1 && $post['type']=='di_tre')
            {
                $data = $model->thong_ke_date_di_tre($post['inp']);
                $this->assignRef('data',$data);
                //print_r($data);die;
                
            }
            else if($post['action']==1 && $post['type']=='ve_som')
            {
                $data = $model->thong_ke_date_ve_som($post['inp']);
                $this->assignRef('data',$data);
                $tpl = 've_som';
            }
            else if($post['action']==2 && $post['type']=='di_tre')
            {
                $data = $model->thong_ke_thang_ve_som($post['inp']);
                $this->assignRef('data',$data);
                $tpl = 'di_tre_thang';
            }*/
        //}
        $layout = JRequest::getVar('layout','','post');
        $post = JRequest::get('post',4);
        print_r($post);
        if($layout == 'late_date')
        {
            require('view_late_date.php');
            $data = report_date_late($post['datepicker']);
            $this->assignRef('data',$data);
        }
        else if($layout == 'soon_date')
        {
            require('view_soon_date.php');
            $data = report_date_soon($post['datepicker']);
            $this->assignRef('data',$data);
        }
        else if($layout =='late_month')
        {
             require('view_late_month.php');
            $data = report_month_late($post['cbo_month']);
            $this->assignRef('data',$data);
        }
        else if($layout =='soon_month')
        {
             require('view_soon_month.php');
            $data = report_month_soon($post['cbo_month']);
            $this->assignRef('data',$data);
        }
        
        //echo $layout;die;
        
        //echo $layout;
        parent::display($tpl);
	}
	
}
